package com.jcl.traffic.system.domain;

import lombok.Data;

import javax.persistence.*;
import java.util.List;

/**
 * @author jcl_hqu
 * @date 2020/12/26 16:51
 */

@Data
@Entity
@Table(name = "person")
public class Person {
    @Id
    private Long id;
    private String address;
    private String sex;
    private String id_card;

    @OneToMany(mappedBy = "person",cascade = {CascadeType.ALL},fetch = FetchType.LAZY,orphanRemoval = true)
    private List<Motor> motors;
}
